<?php
/**
 * recent.phtml
 * 
 * @category    Madoqua
 * @package     Module
 * @subpackage  BlogAdmin
 */

$this->adminNavigation('page', 'index');

?>
<div class="recent-pages">
    <?php if (count($this->pages)) : ?>
    <ul>
        <?php foreach ($this->pages as $page) : ?>
        <li>
            <h3>
                <a href="<?php echo $this->url(array('controller' => 'page', 'action' => 'update', 'id' => $page->id), 'blog_admin', true); ?>">
                    <?php echo $page->title; ?>
                </a>
           </h3>
           <a href="<?php echo $this->url(array('controller' => 'page', 'action' => 'update', 'id' => $page->id), 'blog_admin', true); ?>">
                <span class="date">
                  <?php echo $this->date($page->posted); ?>
                </span>
            </a>
        </li>
        <?php endforeach; ?>
    </ul>
    <?php else : ?>
    <p>
        You have not created any pages yet. Why don't you 
        <a href="<?php echo $this->url(array('action' => 'create', 'controller' => 'page'), 'blog_admin'); ?>">write</a> one!
    </p>
    
    <?php endif; ?>
</div>